import request from '@/utils/request'
import { LoginReq } from './type'
import { BaseResponse } from '../base'

export function login(data: LoginReq): Promise<BaseResponse> {
	return request({ url: '/campus/login', method: 'post', data })
}
export function logout(): Promise<BaseResponse> {
	return request({ url: '/campus/logout', method: 'post' })
}
export function register(data: LoginReq): Promise<BaseResponse> {
	return request({ url: '/campus/register', method: 'post', data })
}
export function getInfo(): Promise<BaseResponse> {
	return request({ url: '/campus/userInfo', method: 'get' })
}